<template>
  <div class="top">
    <van-checkbox-group v-model="result" ref="checkboxGroup">
    <van-row v-for="(item, index) in list" :key="index">
      <van-col span="2">
           <van-checkbox v-model="checked"></van-checkbox>
      </van-col>
      <van-col span="22">
        <van-swipe-cell>
          <van-card
            :price="item.basicInfo.minPrice"
            :desc="item.basicInfo.characteristic"
            :title="item.basicInfo.name"
            :thumb="item.basicInfo.pic"
          >
            <template #footer>
              <van-stepper
                v-model="value"
                :default-value="item.num"
              /> </template
          ></van-card>
          <template #right>
            <van-button
              square
              text="删除"
              type="danger"
              class="delete-button"
                 @click="remove(item.basicInfo.id)"
            />
          </template>
        </van-swipe-cell>
      </van-col>
    </van-row>
    </van-checkbox-group>
    <div class="but_sumbur">
        <van-submit-bar :price="3050" button-text="提交订单" >
  <van-checkbox v-model="checked">全选</van-checkbox>

</van-submit-bar>
    </div>
  </div>
</template>

<script>
import mixin from "../../store/index";
export default {
  mixins: [mixin],
  data() {
    return {
        checked:false,
    result:[]
    };
  },
  mounted() {
    console.log(this.list);
    
    
  },
 methods: {
   remove(id){
     this.ShoppingCart_remove(id)
   }
 },
};
</script>
<style lang="scss" scoped>
.top {
  margin-top: 1rem;
}
.van-checkbox {
  height: 100%;
}
.van-button--danger {
  height: 100%;
}
.but_sumbur{
  width: 100%;
  height: 1rem;
  position: fixed;
  bottom: 1.2rem;
  // background-color: aquamarine;
  left: 0;
}
.van-submit-bar{
  width: 90%;
  position: fixed;
  bottom: 1.2rem;
  left: 10%;
}
</style>